projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01096a7
)
(get_scrap_target_type_list): Avoid NULL pointer dereference.
author
YAMAMOTO Mitsuharu
<mituharu@math.s.chiba-u.ac.jp>
Thu, 14 Jul 2005 09:23:12 +0000
(09:23 +0000)
committer
YAMAMOTO Mitsuharu
<mituharu@math.s.chiba-u.ac.jp>
Thu, 14 Jul 2005 09:23:12 +0000
(09:23 +0000)
src/macselect.c
patch
|
blob
|
history
diff --git
a/src/macselect.c
b/src/macselect.c
index b519950eb75f2a37807e3786b99abf4df6ead75c..94fe591a2061138984b278975e3573379a884ecc 100644
(file)
--- a/
src/macselect.c
+++ b/
src/macselect.c
@@
-371,7
+371,7
@@
get_scrap_target_type_list (scrap)
err = GetScrapFlavorCount (scrap, &count);
if (err == noErr)
flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count);
- if (
err == noErr &&
flavor_info)
+ if (flavor_info)
{
err = GetScrapFlavorInfoList (scrap, &count, flavor_info);
if (err != noErr)
@@
-380,6
+380,8
@@
get_scrap_target_type_list (scrap)
flavor_info = NULL;
}
}
+ if (flavor_info == NULL)
+ count = 0;
#endif
for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest))
{